// Copyright (C) 2012 by Johann Duscher <jonny.dee@gmx.net>
//
// This file is part of barcodeart-pp.
//
// barcodeart-pp is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// barcodeart-pp is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with barcodeart-pp. If not, see <http://www.gnu.org/licenses/>.

#pragma once

#include "barcodeart/barcodeart.hpp"


namespace barcodeart
{

class BorderDecorator : public IBarCode
{
public:
    BorderDecorator(const IBarCode& delegate, int margin = 3, bool black = false);
    ~BorderDecorator();

    void setBlack(bool value);
    bool isBlack() const;

    void setMargin(int value);
    int getMargin() const;

    int getWidth() const;
    int getHeight() const;
    bool isBlack(int y, int x) const;

private:
    const IBarCode* m_pDelegate;
    bool m_black;
    int m_margin;
};

}
